package com.song.invoicing.mapper;

import com.song.invoicing.pojo.dao.User;
import com.song.invoicing.pojo.dto.UserRegisterDTO;
import com.song.invoicing.pojo.vo.UserVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper {
    Long login(String username, String encryptPassword);
    @Select("select count(*) from invoicing.users where username=#{username}")
    int selectByUsername(String username);

    void saveUserInfo(User user);

    UserVO getUserInfo(Long userId);
   @Select("select role from invoicing.users where id=#{userId}")
    byte getUserRole(Long userId);
}
